import { SUCCESS_CODE } from '@/utils/types.d';
import request from '@/utils/request';

export async function queryWechatUsers(params: any, sort: any) {
  const res = await request('/api/wechat-user/v1.0.0/users', {
    method: 'GET',
    params: {
      data: params,
      sort,
    },
  });
  if (res?.code === SUCCESS_CODE)
    return { success: true, total: res.data.total, data: res.data.data };
  return { success: false, total: 0, data: [] };
}
